home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_riv_sectorpush.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  69 lines

  1. # Jones 3D Cog Script
  2. #
  3. # RIV_SectorPush.cog
  4. #
  5. # gives a little push when needed.
  6. #
  7. # [TRM]
  8. #
  9. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.  
  14.     message        entered
  15.     message     exited
  16.     
  17.     surface     surf_On     linkID=1
  18.     
  19.     sector      sec0
  20.     
  21.     vector      vec_Direction
  22.     vector      old_Thrust      local
  23.     
  24.     flex        new_Mag=0
  25.     flex        old_Mag=0
  26.     
  27.     int         thrusting=0     local
  28.     
  29. end
  30.  
  31. # ========================================================================================
  32.  
  33. code
  34.  
  35. entered:
  36.  
  37.     if((GetSenderID() == 1) && (thrusting == 0))
  38.     {
  39.         Print("extra thrust applied");
  40.         thrusting = 1;
  41.         
  42.         old_Thrust = GetSectorThrust(sec0);
  43.         PrintVector(old_Thrust);
  44.     
  45.         Sleep(0.01);
  46.         SetSectorThrust(sec0, vec_Direction, new_Mag);
  47.     }
  48.     
  49.     return;
  50.  
  51. # ========================================================================================
  52.  
  53. exited:
  54.  
  55.     #if((GetSenderID() == 1) && (GetSourceRef() == player))
  56.     if(GetSenderID() == 1)
  57.     {
  58.         Print("thrust set to normal");
  59.         thrusting = 0;
  60.         SetSectorThrust(sec0, old_Thrust, old_Mag);
  61.         PrintVector(old_Thrust);
  62.     }
  63.     
  64.     return;
  65.  
  66. # ========================================================================================
  67.  
  68. end
  69.